package com.dnjn.mes.biz.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dnjn.mes.biz.enums.DataType;
import com.dnjn.mes.biz.enums.ExceptStatus;
import com.dnjn.mes.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 异常报警表，正确状态不写入
 * </p>
 *
 * @author Amber
 * @since 2023-07-27
 */
@Accessors(chain = true)
@Getter
@Setter
@TableName("mes_record_except")
public class MesRecordExcept extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * PK
     */
    @TableId(value = "record_except_id", type = IdType.ASSIGN_ID)
    private Long recordExceptId;

    @TableField(exist = false)
    private LocalDateTime currentDatetime;

    @TableField(exist = false)
    private LocalDate currentDate;

    private LocalDateTime startDatetime;
    /**
     * 处理时间、解决时间
     */
    private LocalDateTime resolvedTime;

    private DataType dataType;

    /**
     * 已处理， 未处理
     */
    private ExceptStatus exceptStatus;

    @TableField("data_value")
    private Integer dataValue;


    private String extValue;

    private Long exceptId;

    @TableField(exist = false)
    private Long planId;

    private Long equipmentId;

    private Double durationHour;

    @TableField(exist = false)
    private String exceptMessage;
    @TableField(exist = false)
    private String exceptMessageCn;
    @TableField(exist = false)
    private String description;
    @TableField(exist = false)
    private String createTime1;
    //每天故障次数 | 维修时间占比 | 各个故障占比
    @TableField(exist = false)
    private Double counts;
}
